package com.yida.gwj.config.controller;

import com.yida.common.core.web.controller.BaseController;
import com.yida.common.core.web.domain.AjaxResult;
import com.yida.gwj.config.service.GwjAttachmentStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: PPV
 * @Date: 2023-04-24
 */
@RestController
@RequestMapping("/attachStatus")
@Api(tags = "附件状态")
public class GwjAttachmentStatusController extends BaseController {

    @Resource
    private GwjAttachmentStatusService statusService;

    @ApiOperation("修改附件状态为不可上传")
    @PutMapping("/inner/ban")
    public AjaxResult banUp(@RequestParam("serverIdentification") String serverIdentification, @RequestParam("outServerIdentification") String outServerIdentification) {
        return toAjax(statusService.banUp(serverIdentification, outServerIdentification));
    }

    @ApiOperation("修改附件状态为可上传")
    @PutMapping("/inner/allow")
    public AjaxResult allowUp(@RequestParam("serverIdentification") String serverIdentification, @RequestParam("outServerIdentification") String outServerIdentification) {
        return toAjax(statusService.allowUp(serverIdentification, outServerIdentification));
    }

}
